<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkRadioButton</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
<link rel="up" href="ButtonWidgets.html" title="Buttons and Toggles">
<link rel="prev" href="GtkCheckButton.html" title="GtkCheckButton">
<link rel="next" href="GtkToggleButton.html" title="GtkToggleButton">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GtkCheckButton.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ButtonWidgets.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GTK+ 2 Reference Manual</th>
<td><a accesskey="n" href="GtkToggleButton.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#GtkRadioButton.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#GtkRadioButton.description" class="shortcut">Description</a>
                   | 
                  <a href="#GtkRadioButton.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#GtkRadioButton.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
                   | 
                  <a href="#GtkRadioButton.properties" class="shortcut">Properties</a>
                   | 
                  <a href="#GtkRadioButton.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="GtkRadioButton"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkRadioButton.top_of_page"></a>GtkRadioButton</span></h2>
<p>GtkRadioButton — A choice from multiple check buttons</p>
</td>
<td valign="top" align="right"><img src="radio-group.png"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GtkRadioButton.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;gtk/gtk.h&gt;

struct              <a class="link" href="GtkRadioButton.html#GtkRadioButton-struct" title="struct GtkRadioButton">GtkRadioButton</a>;
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkRadioButton.html#gtk-radio-button-new" title="gtk_radio_button_new ()">gtk_radio_button_new</a>                (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *group</code></em>);
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkRadioButton.html#gtk-radio-button-new-from-widget" title="gtk_radio_button_new_from_widget ()">gtk_radio_button_new_from_widget</a>    (<em class="parameter"><code><a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> *radio_group_member</code></em>);
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkRadioButton.html#gtk-radio-button-new-with-label" title="gtk_radio_button_new_with_label ()">gtk_radio_button_new_with_label</a>     (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *group</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkRadioButton.html#gtk-radio-button-new-with-label-from-widget" title="gtk_radio_button_new_with_label_from_widget ()">gtk_radio_button_new_with_label_from_widget</a>
                                                        (<em class="parameter"><code><a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> *radio_group_member</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkRadioButton.html#gtk-radio-button-new-with-mnemonic" title="gtk_radio_button_new_with_mnemonic ()">gtk_radio_button_new_with_mnemonic</a>  (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *group</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="GtkRadioButton.html#gtk-radio-button-new-with-mnemonic-from-widget" title="gtk_radio_button_new_with_mnemonic_from_widget ()">gtk_radio_button_new_with_mnemonic_from_widget</a>
                                                        (<em class="parameter"><code><a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> *radio_group_member</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);
#define             <a class="link" href="GtkRadioButton.html#gtk-radio-button-group" title="gtk_radio_button_group">gtk_radio_button_group</a>
<span class="returnvalue">void</span>                <a class="link" href="GtkRadioButton.html#gtk-radio-button-set-group" title="gtk_radio_button_set_group ()">gtk_radio_button_set_group</a>          (<em class="parameter"><code><a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> *radio_button</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *group</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *            <a class="link" href="GtkRadioButton.html#gtk-radio-button-get-group" title="gtk_radio_button_get_group ()">gtk_radio_button_get_group</a>          (<em class="parameter"><code><a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> *radio_button</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GtkRadioButton.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
         +----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>
               +----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
                     +----<a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
                           +----<a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
                                 +----<a class="link" href="GtkButton.html" title="GtkButton">GtkButton</a>
                                       +----<a class="link" href="GtkToggleButton.html" title="GtkToggleButton">GtkToggleButton</a>
                                             +----<a class="link" href="GtkCheckButton.html" title="GtkCheckButton">GtkCheckButton</a>
                                                   +----GtkRadioButton
</pre>
</div>
<div class="refsect1">
<a name="GtkRadioButton.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkRadioButton implements
 AtkImplementorIface,  <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a> and  <a class="link" href="GtkActivatable.html" title="GtkActivatable">GtkActivatable</a>.</p>
</div>
<div class="refsect1">
<a name="GtkRadioButton.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="GtkRadioButton.html#GtkRadioButton--group" title='The "group" property'>group</a>"                    <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a>*       : Write
</pre>
</div>
<div class="refsect1">
<a name="GtkRadioButton.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="GtkRadioButton.html#GtkRadioButton-group-changed" title='The "group-changed" signal'>group-changed</a>"                                  : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
</pre>
</div>
<div class="refsect1">
<a name="GtkRadioButton.description"></a><h2>Description</h2>
<p>
A single radio button performs the same basic function as a <a class="link" href="GtkCheckButton.html" title="GtkCheckButton"><span class="type">GtkCheckButton</span></a>,
as its position in the object hierarchy reflects. It is only when multiple
radio buttons are grouped together that they become a different user
interface component in their own right.</p>
<p>
Every radio button is a member of some group of radio buttons. When one is selected, all other
radio buttons in the same group are deselected. A <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> is one way
of giving the user a choice from many options.
</p>
<p>
Radio button widgets are created with <a class="link" href="GtkRadioButton.html#gtk-radio-button-new" title="gtk_radio_button_new ()"><code class="function">gtk_radio_button_new()</code></a>, passing NULL
as the argument if this is the first radio button in a group. In subsequent
calls, the group you wish to add this button to should be passed as an
argument. Optionally, <a class="link" href="GtkRadioButton.html#gtk-radio-button-new-with-label" title="gtk_radio_button_new_with_label ()"><code class="function">gtk_radio_button_new_with_label()</code></a> can be used if you
want a text label on the radio button.
</p>
<p>
Alternatively, when adding widgets to an existing group of radio buttons,
use <a class="link" href="GtkRadioButton.html#gtk-radio-button-new-from-widget" title="gtk_radio_button_new_from_widget ()"><code class="function">gtk_radio_button_new_from_widget()</code></a> with a <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> that already
has a group assigned to it. The convenience function
<a class="link" href="GtkRadioButton.html#gtk-radio-button-new-with-label-from-widget" title="gtk_radio_button_new_with_label_from_widget ()"><code class="function">gtk_radio_button_new_with_label_from_widget()</code></a> is also provided.
</p>
<p>
To retrieve the group a <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> is assigned to, use
<a class="link" href="GtkRadioButton.html#gtk-radio-button-get-group" title="gtk_radio_button_get_group ()"><code class="function">gtk_radio_button_get_group()</code></a>.
</p>
<p>
To remove a <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> from one group and make it part of a new one, use <a class="link" href="GtkRadioButton.html#gtk-radio-button-set-group" title="gtk_radio_button_set_group ()"><code class="function">gtk_radio_button_set_group()</code></a>.
</p>
<p>
The group list does not need to be freed, as each <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> will remove
itself and its list item when it is destroyed.
</p>
<p>
</p>
<div class="example">
<a name="id475774"></a><p class="title"><b>Example 15. How to create a group of two radio buttons.</b></p>
<div class="example-contents">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="type">void</span><span class="normal"> </span><span class="function">create_radio_buttons</span><span class="normal"> </span><span class="symbol">(</span><span class="type">void</span><span class="symbol">)</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="normal">   </span><span class="usertype">GtkWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">window</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">radio1</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">radio2</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">box</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">entry</span><span class="symbol">;</span>
<span class="normal">   window </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkWindow.html#gtk-window-new">gtk_window_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="gtk-Standard-Enumerations.html#GTK-WINDOW-TOPLEVEL:CAPS">GTK_WINDOW_TOPLEVEL</a></span><span class="symbol">);</span>
<span class="normal">   box </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkVBox.html#gtk-vbox-new">gtk_vbox_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">2</span><span class="symbol">);</span>
<span class="normal">   </span><span class="comment">/* Create a radio button with a GtkEntry widget */</span>
<span class="normal">   radio1 </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkRadioButton.html#gtk-radio-button-new">gtk_radio_button_new</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS">NULL</a></span><span class="symbol">);</span>
<span class="normal">   entry </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkEntry.html#gtk-entry-new">gtk_entry_new</a></span><span class="normal"> </span><span class="symbol">();</span>
<span class="normal">   </span><span class="function"><a href="GtkContainer.html#gtk-container-add">gtk_container_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_CONTAINER</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">radio1</span><span class="symbol">),</span><span class="normal"> entry</span><span class="symbol">);</span>
<span class="normal">   </span><span class="comment">/* Create a radio button with a label */</span>
<span class="normal">   radio2 </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="GtkRadioButton.html#gtk-radio-button-new-with-label-from-widget">gtk_radio_button_new_with_label_from_widget</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_RADIO_BUTTON</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">radio1</span><span class="symbol">),</span>
<span class="normal">                            </span><span class="string">"I'm the second radio button."</span><span class="symbol">);</span>
<span class="normal">   </span><span class="comment">/* Pack them into a box, then show all the widgets */</span>
<span class="normal">   </span><span class="function"><a href="GtkBox.html#gtk-box-pack-start">gtk_box_pack_start</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_BOX</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">box</span><span class="symbol">),</span><span class="normal"> radio1</span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">2</span><span class="symbol">);</span>
<span class="normal">   </span><span class="function"><a href="GtkBox.html#gtk-box-pack-start">gtk_box_pack_start</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_BOX</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">box</span><span class="symbol">),</span><span class="normal"> radio2</span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">,</span><span class="normal"> <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS">TRUE</a></span><span class="symbol">,</span><span class="normal"> </span><span class="number">2</span><span class="symbol">);</span>
<span class="normal">   </span><span class="function"><a href="GtkContainer.html#gtk-container-add">gtk_container_add</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_CONTAINER</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">window</span><span class="symbol">),</span><span class="normal"> box</span><span class="symbol">);</span>
<span class="normal">   </span><span class="function"><a href="GtkWidget.html#gtk-widget-show-all">gtk_widget_show_all</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">window</span><span class="symbol">);</span>
<span class="normal">   </span><span class="keyword">return</span><span class="symbol">;</span>
<span class="cbracket">}</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

</div>
<p><br class="example-break">
</p>
<p>
When an unselected button in the group is clicked the clicked button
receives the "toggled" signal, as does the previously selected button.
Inside the "toggled" handler, <a class="link" href="GtkToggleButton.html#gtk-toggle-button-get-active" title="gtk_toggle_button_get_active ()"><code class="function">gtk_toggle_button_get_active()</code></a> can be used
to determine if the button has been selected or deselected.
</p>
</div>
<div class="refsect1">
<a name="GtkRadioButton.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GtkRadioButton-struct"></a><h3>struct GtkRadioButton</h3>
<pre class="programlisting">struct GtkRadioButton;</pre>
<p>
Contains only private data that should be read and manipulated using the
functions below.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-button-new"></a><h3>gtk_radio_button_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_radio_button_new                (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *group</code></em>);</pre>
<p>
Creates a new <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a>. To be of any practical value, a widget should
then be packed into the radio button.
</p>
<p>
Creates a new <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a>. To be of any practical value, a widget should
then be packed into the radio button.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>group</code></em> :</span></p></td>
<td>an existing radio button group, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you are
creating a new group. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new radio button</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-button-new-from-widget"></a><h3>gtk_radio_button_new_from_widget ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_radio_button_new_from_widget    (<em class="parameter"><code><a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> *radio_group_member</code></em>);</pre>
<p>
Creates a new <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a>, adding it to the same group as
<em class="parameter"><code>radio_group_member</code></em>. As with <a class="link" href="GtkRadioButton.html#gtk-radio-button-new" title="gtk_radio_button_new ()"><code class="function">gtk_radio_button_new()</code></a>, a widget
should be packed into the radio button.
</p>
<p>
Creates a new <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a>, adding it to the same group as <em class="parameter"><code>radio_group_member</code></em>.
As with <a class="link" href="GtkRadioButton.html#gtk-radio-button-new" title="gtk_radio_button_new ()"><code class="function">gtk_radio_button_new()</code></a>, a widget should be packed into the radio button.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>radio_group_member</code></em> :</span></p></td>
<td>an existing <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new radio button. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-button-new-with-label"></a><h3>gtk_radio_button_new_with_label ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_radio_button_new_with_label     (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *group</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
<p>
Creates a new <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> with a text label.
</p>
<p>
Creates a new <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> with a text label.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>group</code></em> :</span></p></td>
<td>an existing radio button group, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if you are
creating a new group. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
<td>the text label to display next to the radio button.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new radio button.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-button-new-with-label-from-widget"></a><h3>gtk_radio_button_new_with_label_from_widget ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_radio_button_new_with_label_from_widget
                                                        (<em class="parameter"><code><a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> *radio_group_member</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
<p>
Creates a new <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> with a text label, adding it to
the same group as <em class="parameter"><code>radio_group_member</code></em>.
</p>
<p>
Creates a new <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> with a text label, adding it to the same group
as <em class="parameter"><code>radio_group_member</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>radio_group_member</code></em> :</span></p></td>
<td>widget to get radio group from or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
<td>a text string to display next to the radio button.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new radio button. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-button-new-with-mnemonic"></a><h3>gtk_radio_button_new_with_mnemonic ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_radio_button_new_with_mnemonic  (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *group</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
<p>
Creates a new <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> containing a label, adding it to the same 
group as <em class="parameter"><code>group</code></em>. The label will be created using 
<a class="link" href="GtkLabel.html#gtk-label-new-with-mnemonic" title="gtk_label_new_with_mnemonic ()"><code class="function">gtk_label_new_with_mnemonic()</code></a>, so underscores in <em class="parameter"><code>label</code></em> indicate the 
mnemonic for the button.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>group</code></em> :</span></p></td>
<td>the radio button group</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
<td>the text of the button, with an underscore in front of the
mnemonic character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-button-new-with-mnemonic-from-widget"></a><h3>gtk_radio_button_new_with_mnemonic_from_widget ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *         gtk_radio_button_new_with_mnemonic_from_widget
                                                        (<em class="parameter"><code><a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> *radio_group_member</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *label</code></em>);</pre>
<p>
Creates a new <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> containing a label. The label
will be created using <a class="link" href="GtkLabel.html#gtk-label-new-with-mnemonic" title="gtk_label_new_with_mnemonic ()"><code class="function">gtk_label_new_with_mnemonic()</code></a>, so underscores
in <em class="parameter"><code>label</code></em> indicate the mnemonic for the button.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>radio_group_member</code></em> :</span></p></td>
<td>widget to get radio group from or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>label</code></em> :</span></p></td>
<td>the text of the button, with an underscore in front of the
mnemonic character</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-button-group"></a><h3>gtk_radio_button_group</h3>
<pre class="programlisting">#define gtk_radio_button_group gtk_radio_button_get_group
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gtk_radio_button_group</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Deprecated compatibility macro. Use <a class="link" href="GtkRadioButton.html#gtk-radio-button-get-group" title="gtk_radio_button_get_group ()"><code class="function">gtk_radio_button_get_group()</code></a> instead.
</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-button-set-group"></a><h3>gtk_radio_button_set_group ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gtk_radio_button_set_group          (<em class="parameter"><code><a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> *radio_button</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> *group</code></em>);</pre>
<p>
Sets a <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a>'s group. It should be noted that this does not change
the layout of your interface in any way, so if you are changing the group,
it is likely you will need to re-arrange the user interface to reflect these
changes.
</p>
<p>
Sets a <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a>'s group. It should be noted that this does not change
the layout of your interface in any way, so if you are changing the group,
it is likely you will need to re-arrange the user interface to reflect these
changes.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>radio_button</code></em> :</span></p></td>
<td>a <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group</code></em> :</span></p></td>
<td>an existing radio
button group, such as one returned from <a class="link" href="GtkRadioButton.html#gtk-radio-button-get-group" title="gtk_radio_button_get_group ()"><code class="function">gtk_radio_button_get_group()</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkRadioButton]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-radio-button-get-group"></a><h3>gtk_radio_button_get_group ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Singly-Linked-Lists.html#GSList"><span class="returnvalue">GSList</span></a> *            gtk_radio_button_get_group          (<em class="parameter"><code><a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> *radio_button</code></em>);</pre>
<p>
Retrieves the group assigned to a radio button.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>radio_button</code></em> :</span></p></td>
<td>a <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a linked list
containing all the radio buttons in the same group
as <em class="parameter"><code>radio_button</code></em>. The returned list is owned by the radio button
and must not be modified or freed. <span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkRadioButton][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="GtkRadioButton.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkRadioButton--group"></a><h3>The <code class="literal">"group"</code> property</h3>
<pre class="programlisting">  "group"                    <a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a>*       : Write</pre>
<p>
Sets a new group for a radio button.
</p>
</div>
</div>
<div class="refsect1">
<a name="GtkRadioButton.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkRadioButton-group-changed"></a><h3>The <code class="literal">"group-changed"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="GtkRadioButton.html" title="GtkRadioButton"><span class="type">GtkRadioButton</span></a> *style,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>        user_data)      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
Emitted when the group of radio buttons that a radio button belongs
to changes. This is emitted when a radio button switches from
being alone to being part of a group of 2 or more buttons, or
vice-versa, and when a button is moved from one group of 2 or
more buttons to a different one, but not when the composition
of the group that a button belongs to changes.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>style</code></em> :</span></p></td>
<td>the object which received the signal</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.4</p>
</div>
</div>
<div class="refsect1">
<a name="GtkRadioButton.see-also"></a><h2>See Also</h2>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><a class="link" href="GtkOptionMenu.html" title="GtkOptionMenu"><span class="type">GtkOptionMenu</span></a></span></p></td>
<td><p>Another way of offering the user a single choice from
many.</p></td>
</tr></tbody>
</table></div>
<p>
</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>